home *** CD-ROM | disk | FTP | other *** search
- #define __MSGBOX_H
-
-
- #ifndef __DLGBOX_H
- #include "dlgbox.h"
- #endif
-
-
- class cthelpobj;
-
-
- class msgboxobj:dlgboxobj
- {
- int ctid; /* help topic id */
- int nobtns; /* no of buttons excluding the possible help button */
- int idbtnesc; /* id for the escape button. -1 for none */
- int iscenter; /* center the dlg box */
- int isdelicon; /* did we load the icon & thus should del it later */
- HICON hicon; /* icon handle. 0 for none */
- char title[40];
- char txt[1024]; /* msg */
- char btntxts[3][20];
- cthelpobj *ctobj; /* online help. 0 for none */
-
- int cmd(UINT id);
- void free();
- void init();
- void clricon();
- void setbtnsvar(int nobtnsx, ...);
-
- public:
-
- msgboxobj();
-
- ~msgboxobj()
- {
- clricon();
- }
-
- int go(HWND owner, char title[], int iscenter = 1);
- int getnobtnsall();
- void settext(char fmt[], ...);
- void seticon(HICON hicon);
- void seticon(UINT iconid);
- void seticon(char iconname[]);
- void setbtns(UINT btnsid);
- void setbtns(char *btntxt1);
- void setbtns(char *btntxt1, char *btntxt2);
- void setbtns(char *btntxt1, char *btntxt2, char *btntxt3);
- void sethelp(cthelpobj *ctobj, int ctid);
- void setescbtn(int btnno);
- BOOL onmsg(UINT msg, WPARAM wp, LPARAM lp);
- };
-
-